

INFORMATION FOR UNDERSTANDING THE DATASETS AND CODES FOR ARTICLE "Is Protectionism on the Rise? Assessing National Trade Policies during the Crises of 2008"



The results of the article are based on 18 STATA codes. The names of the codes start with a number, indicating the order in which they should be run.

* Code 1_cr_tariff.do prepares files with bilateral tariffs. 
* Code 2_Figure_1_data.do prepares simple averages of bilateral and mfn tariffs. 
* Code 3_Figure_1.do prepares Figure 1 using the dataset compiled by the previous code. 
* Code 4_cr_tariffMFN2 provides data on MFN tariffs at 6 digit product code level in the HS1988/92 (HS0) classification.
* Code 5_merge_tariff_and_trade merges bilateral and mfn tariffs with trade. 
* Code 6_calculate_total_trade adds up the trade data by country, obtaining an aggregate to be used in Table 2.
* Codes 7_ through 11_ compile the AD data and merge it with trade at tariff line level.
* Code 12_Table_1.do produces some of the columns in Table 1. Source of all data in Table 1 are described in the Excel file.
* Codes 13a through 15b calculate the OTRI indices and the trade effects for three scenarios: 
with MFN elasticities (1), with bilateral elasticities and tariffs only (2), with bilateral elasticities, tariffs and AD duties (3).
* Code 16_Figure_2.do produces Figure 2 based on a dataset obtained by running all previous codes. 

NOTES: 

1. Place all files in the same folder before running the codes (make sure the location of the folder is provided in each code).
2. Bilateral elasticities data are not provided here, hence codes using these indicators (13a_cr_OTRI_bilelas.do, 13b_cr_trade_effect_bilelas.do, 14a_cr_OTRI_bilelas_AD.do, 14b_cr_trade_effect_bilelas_AD.do) cannot be run. 
Please request the bilateral elasticities directly from author Hiau Looi Kee.




**********************************************************************************************************************************************************

DESCRIPTION OF UNDERLYING DATA:
===============================

I. bilateral tariffs in HS2002 product classification from ITC- available in text files containing "pre_wb" in the name. Here is the typical content of these files:

. des

Contains data
obs:    18,456,287                          
vars:             5                          
size:   313,756,879 (69.4% of memory free)
		
storage  display     value
variable name   type   format      label      variable	label
		
year            int    %8.0g                  
reporter        byte   %8.0g                  
hs6             long   %12.0g                 HS6
partner         int    %8.0g                  Partner
totarif         float  %9.0g                  
		
Sorted by:  
Note:  dataset has changed since last saved


 
**********************************************************************************************************************************************************
II. MFN tariff files at tariff line level and in the original classification reported by countries. 
Except for Japan and Korea, these data are from ITC. The typical mfn files have the following content:

. use C:\RESTAT\mfn_ARG.dta

. des

Contains data from C:\RESTAT\mfn_ARG.dta
  obs:        19,430                          
 vars:             8                          24 Aug 2013 01:11
 size:       835,490 (99.9% of memory free)
------------------------------------------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
------------------------------------------------------------------------------------------------------------------------------------------------
rev             str4   %9s                    classification
ccode           str3   %9s                    ISO3
year            int    %8.0g                  
ntlc            str12  %12s                   8 digit product code in original classification
MFN             float  %9.0g                  
hs6             str6   %9s                    6 digit product code in original classification
hs88            str7   %9s                    6 digit product code in HS0 classification
flag            byte   %8.0g                  1 if product has no counterpart in HS0 (imp. because simple averages are calcula
------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by:  

**********************************************************************************************************************************************************
III. trade files, labelled trade_countrycode. Trade data is expressed in HS0 classification. The source is UN COMTRADE.

Contains data from C:\RESTAT\trade_ARG.dta
obs:       113,736	  
vars:             6	8 May 2013 16:30
size:     3,412,080 (99.7% of memory free)
		
storage  display     value
variable name   type   format      label	variable label
		
ccode           str3   %9s	ReporterISO3
pcode           str3   %9s	PartnerISO3
hs6             str6   %9s	ProductCode
trade           double %9.0g	(sum) trade
yrtr            int    %8.0g	Year
year            float  %9.0g	  
		
Sorted by:  year  ccode  pcode  hs6

**********************************************************************************************************************************************************

IV. MFN elasticities: => in file Elast_data_shaped.dta

. des

Contains data from C:\RESTAT1\Underlying_data\MFN_elasticities\Elast_data_shaped.dta
obs:       442,881                          
vars:             4                          22 Mar 2010 14:07
size:    10,186,263 (99.0% of memory free)
	
storage  display     value
variable name   type   format      label      variable label
	
ccode           str5   %9s                    
hs6             str6   %9s                    
meanelas        float  %9.0g                  
OK_elas_fit     float  %9.0g                  
	
Sorted by:  ccode  hs6

**********************************************************************************************************************************************************

V. AD Duties: please see the description of the source in the article. Files are named: file_countryname_master.dta; file_countryname_prod.dta.

. des

Contains data	from C:\RESTAT1\ANTI_DUMPING\Underlying_data\INITIAL\file_ARG_master.dta
obs:	26                          
vars:	6                          8 Feb 2010 18:58
size:	1,092 (99.9% of memory free)
		
	storage  display     value
variable name	type   format      label      variable label
		
var	byte   %8.0g                  
case_id	str10  %10s                   CASE_ID
inv_cty_code	str3   %9s                    INV_CTY_CODE
p_ad_date	str10  %10s                   P_AD_DATE
f_ad_date	str10  %10s                   F_AD_DATE
duty	float  %9.0g                  
		
Sorted by:  

. des

Contains data from C:\RESTAT1\ANTI_DUMPING\Underlying_data\INITIAL\file_ARG_prod.dta
obs:           755                          
vars:             3                          29 Jan 2010 00:47
size:        25,670 (99.8% of memory free)
	
storage  display     value
variable name   type   format      label      variable label
	
case_id         str10  %10s                   
hs_code         str11  %11s                   
hs_digits       str9   %9s                    
	
Sorted by:  case_id

VI. TRADE from UN COMTRADE - tariff line level - text files:

file_countryname_year.txt


Contains data
  obs:        83,170                          
 vars:             9                          
 size:     4,408,010 (58.0% of memory free)
------------------------------------------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
------------------------------------------------------------------------------------------------------------------------------------------------
nomencode       str2   %9s                    NomenCode
reporteriso3    str3   %9s                    ReporterISO3
partneriso3     str3   %9s                    PartnerISO3
tradeflow       byte   %8.0g                  TradeFlow
productcode     str21  %21s                   ProductCode
year            int    %8.0g                  Year
tradevalue      double %10.0g                 TradeValue
quantity        double %10.0g                 Quantity
qtytoken        byte   %8.0g                  QtyToken
------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by:  
     Note:  dataset has changed since last saved


**********************************************************************************************************************************************************
VII. Other files:

=> files to help with conversion of products from one classification to another, obtained from UN COMTRADE:    
hs01hs02.dta      
hs02hs07.dta      
hs88hs02.dta      
hs88hs07.dta      
hs88hs96.dta   
=> file useful for obtaining country codes and names:
Code_Pays.dta
countrynames.dta  



